package com.rnkrsoft.suyan.config.server.services.param.domains;

import com.rnkrsoft.suyan.config.internal.enums.ParamStatusEnum;
import com.rnkrsoft.suyan.config.internal.enums.YesOrNo;
import com.rnkrsoft.suyan.config.protocol.v2.DataTypeEnum;
import com.rnkrsoft.suyan.config.protocol.v2.ParamType;
import com.rnkrsoft.suyan.config.server.ajax.session.LoginUserId;
import com.rnkrsoft.suyan.config.server.ajax.session.LoginUserName;
import com.rnkrsoft.suyan.config.server.services.authority.domains.AuthorityUser;
import lombok.Data;

import javax.doc.annotation.ApidocElement;
import javax.doc.data.Request;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by woate on 2018/6/19.
 */
@Data
public class UpdateParamRequest extends Request implements LoginUserId , LoginUserName {
    @ApidocElement(value = "参数编号", maxLen = 36)
    String paramId;
    @ApidocElement(value = "参数名")
    String paramName;
    @ApidocElement(value = "参数值", required = false, maxLen = 3024)
    String paramValue;
    @ApidocElement(value = "数据类型", enumClass = DataTypeEnum.class)
    Integer paramDataType;
    @ApidocElement(value = "参数类型", enumClass = ParamType.class)
    Integer paramType;
    @ApidocElement(value = "是否动态参数", enumClass = YesOrNo.class, defaults = "1")
    String paramDynamic;
    @ApidocElement(value = "是否加密参数", enumClass = YesOrNo.class, defaults = "1")
    String paramEncrypt;
    @ApidocElement(value = "是否为SystemProperties参数", enumClass = YesOrNo.class, defaults = "1")
    String systemProperties;
    @ApidocElement(value = "参数状态", enumClass = ParamStatusEnum.class)
    Integer paramStatus;
    @ApidocElement(value = "参数描述", required = false)
    String paramDesc;
    @ApidocElement(value = "拥有权限的用户", required = false)
    final List<AuthorityUser> authorityUsers = new ArrayList<AuthorityUser>();

    Integer loginUserId;
    String loginUserName;
}
